

<%@ page import="apbms.Socio" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'socio.label', default: 'Socio')}" />
        <title><g:message code="default.create.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="pesquisa" action="pesquisa"><g:message code="default.find.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.create.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${socioInstance}">
            <div class="errors">
                <g:renderErrors bean="${socioInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" enctype="multipart/form-data">
                <div class="dialog">
                    <table>
                        <tbody>
                          
                            <tr class="prop">
                                <td valign="top" class="name" >
                                  <h2>Dados Pessoais</h2>
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="foto3x4"><g:message code="socio.foto3x4.label" default="Foto3x4" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'foto3x4', 'errors')}">
                                  <input type="file" name="foto3x4" id="foto3x4" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="nome"><g:message code="socio.nome.label" default="Nome" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'nome', 'errors')}">
                                    <g:textField name="nome" value="${socioInstance?.nome}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cpf"><g:message code="socio.cpf.label" default="Cpf" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'cpf', 'errors')}">
                                    <g:textField name="cpf" value="${socioInstance?.cpf}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="rg"><g:message code="socio.rg.label" default="Rg" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'rg', 'errors')}">
                                    <g:textField name="rg" value="${socioInstance?.rg}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="natCidade"><g:message code="socio.natCidade.label" default="Nat Cidade" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'natCidade', 'errors')}">
                                    <g:textField name="natCidade" value="${socioInstance?.natCidade}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="netEstado"><g:message code="socio.netEstado.label" default="Net Estado" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'netEstado', 'errors')}">
                                    <g:select name="netEstado.id" from="${apbms.Estado.list()}" optionKey="id" value="${socioInstance?.netEstado?.id}"  />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="nomeMae"><g:message code="socio.nomeMae.label" default="Nome Mae" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'nomeMae', 'errors')}">
                                    <g:textField name="nomeMae" value="${socioInstance?.nomeMae}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="nomePai"><g:message code="socio.nomePai.label" default="Nome Pai" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'nomePai', 'errors')}">
                                    <g:textField name="nomePai" value="${socioInstance?.nomePai}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="estadoCivil"><g:message code="socio.estadoCivil.label" default="Estado Civil" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'estadoCivil', 'errors')}">
                                    <g:select name="estadoCivil" from="${socioInstance.constraints.estadoCivil.inList}" value="${socioInstance?.estadoCivil}" valueMessagePrefix="socio.estadoCivil"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="sexo"><g:message code="socio.sexo.label" default="Sexo" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'sexo', 'errors')}">
                                    <g:select name="sexo" from="${socioInstance.constraints.sexo.inList}" value="${socioInstance?.sexo}" valueMessagePrefix="socio.sexo"  />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="fatorRh"><g:message code="socio.fatorRh.label" default="Fator Rh" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'fatorRh', 'errors')}">
                                    <g:select name="fatorRh" from="${['O-', 'O+', 'A-', 'A+', 'B-', 'B+', 'AB-', 'AB+']}" value="${socioInstance?.fatorRh}" valueMessagePrefix="socio.fatorRh" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="dataDeNascimento"><g:message code="socio.dataDeNascimento.label" default="Data De Nascimento" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'dataDeNascimento', 'errors')}">
                                    <g:datePicker name="dataDeNascimento" precision="day" value="${socioInstance?.dataDeNascimento}"  />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="dataAdmissaoApbms"><g:message code="socio.dataAdmissaoApbms.label" default="Data Admissao Apbms" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'dataAdmissaoApbms', 'errors')}">
                                    <g:datePicker name="dataAdmissaoApbms" precision="day" value="${socioInstance?.dataAdmissaoApbms}"  />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <br/>
                                  <h2>Dados de Contato</h2>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="email"><g:message code="socio.email.label" default="Email" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'email', 'errors')}">
                                    <g:textField name="email" value="${socioInstance?.email}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="celular"><g:message code="socio.celular.label" default="Celular" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'celular', 'errors')}">
                                    <g:textField name="celular" value="${socioInstance?.celular}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="telefone"><g:message code="socio.telefone.label" default="Telefone" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'telefone', 'errors')}">
                                    <g:textField name="telefone" value="${socioInstance?.telefone}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="rua"><g:message code="endereco.rua.label" default="Rua" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: enderecoInstance, field: 'rua', 'errors')}">
                                    <g:textField name="rua" value="${enderecoInstance?.rua}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="numero"><g:message code="endereco.numero.label" default="Numero" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: enderecoInstance, field: 'numero', 'errors')}">
                                    <g:textField name="numero" value="${fieldValue(bean: enderecoInstance, field: 'numero')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="bairro"><g:message code="endereco.bairro.label" default="Bairro" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: enderecoInstance, field: 'bairro', 'errors')}">
                                    <g:textField name="bairro" value="${enderecoInstance?.bairro}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cep"><g:message code="endereco.cep.label" default="Cep" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: enderecoInstance, field: 'cep', 'errors')}">
                                    <g:textField name="cep" value="${enderecoInstance?.cep}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cidade"><g:message code="endereco.cidade.label" default="Cidade" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: enderecoInstance, field: 'cidade', 'errors')}">
                                    <g:textField name="cidade" value="${enderecoInstance?.cidade}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="estado"><g:message code="endereco.estado.label" default="Estado" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: enderecoInstance, field: 'estado', 'errors')}">
                                    <g:select name="estado.id" from="${apbms.Estado.list()}" optionKey="id" value="${enderecoInstance?.estado?.id}"  />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <br/>
                                  <h2>Dados Funcionais</h2>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="nomeDeGuerra"><g:message code="socio.nomeDeGuerra.label" default="Nome De Guerra" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'nomeDeGuerra', 'errors')}">
                                    <g:textField name="nomeDeGuerra" value="${socioInstance?.nomeDeGuerra}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="numeroGuerra"><g:message code="socio.numeroGuerra.label" default="Numero Guerra" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'numeroGuerra', 'errors')}">
                                    <g:textField name="numeroGuerra" value="${socioInstance?.numeroGuerra}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="lotacao"><g:message code="socio.lotacao.label" default="Lotacao" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'lotacao', 'errors')}">
                                    <g:textField name="lotacao" value="${socioInstance?.lotacao}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="telLotacao"><g:message code="socio.telLotacao.label" default="Tel Lotacao" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'telLotacao', 'errors')}">
                                    <g:textField name="telLotacao" value="${socioInstance?.telLotacao}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="dataAdmissaoPm"><g:message code="socio.dataAdmissaoPm.label" default="Data Admissao Pm" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'dataAdmissaoPm', 'errors')}">
                                    <g:datePicker name="dataAdmissaoPm" precision="day" value="${socioInstance?.dataAdmissaoPm}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="matricula"><g:message code="socio.matricula.label" default="Matricula" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'matricula', 'errors')}">
                                    <g:textField name="matricula" value="${socioInstance?.matricula}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <br/>
                                  <h2>Dados Bancarios</h2>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="banco"><g:message code="socio.banco.label" default="Banco" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'banco', 'errors')}">
                                    <g:textField name="banco" value="${socioInstance?.banco}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="contaCorrente"><g:message code="socio.contaCorrente.label" default="Conta Corrente" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'contaCorrente', 'errors')}">
                                    <g:textField name="contaCorrente" value="${socioInstance?.contaCorrente}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="agencia"><g:message code="socio.agencia.label" default="Agencia" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'agencia', 'errors')}">
                                    <g:textField name="agencia" value="${socioInstance?.agencia}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="cidadeBanco"><g:message code="socio.cidadeBanco.label" default="Cidade Banco" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'cidadeBanco', 'errors')}">
                                    <g:textField name="cidadeBanco" value="${socioInstance?.cidadeBanco}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="estadoBanco"><g:message code="socio.estadoBanco.label" default="Estado Banco" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: socioInstance, field: 'estadoBanco', 'errors')}">
                                    <g:select name="estadoBanco.id" from="${apbms.Estado.list()}" optionKey="id" value="${socioInstance?.estadoBanco?.id}"  />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
